/*
 DNN Content Builder - sourceforge.net/projects/dnncb
 Copyright (c) 2004-2007
 by Emerson Lopes (emersonlopes@gmail.com)

 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 
 documentation files (the "Software"), to deal in the Software without restriction, including without limitation 
 the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 
 to permit persons to whom the Software is furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in all copies or substantial portions 
 of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 
 TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 
 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
 DEALINGS IN THE SOFTWARE.
*/

// DotNetNuke Visual C# source code for epContentBuilderDB Data Business Logic, generated sexta-feira, 8 de outubro de 2004 at 21:30:44
// Generated by DotNetNuke DAL Builder 2 from www.dotnetnuke.dk version 2.1.1714.41920

using System;
using System.Collections;
using System.Data;

namespace epContentBuilder {
    
    public class epConnectionStringInfo {
        
        // Entity member variables for database table epConnectionString
        
        private Int32 mConnectionStringId;
        private string mConnectionString;
        
        // Calculated Expression member variables for database table epConnectionString
        
        
        // Entity properties for database table epConnectionString
        
        public Int32 ConnectionStringId {
            get { return mConnectionStringId; }
            set { mConnectionStringId = value; }
        }
        
        
        public string ConnectionString {
            get { return mConnectionString; }
            set { mConnectionString = value; }
        }
        
        
    }
    
    public class epConnectionStringController {
        
        public Int32 Add(EpConnectionStringInfo epConnectionStringInfo) {
            return (Int32) DataProvider.Instance().EpConnectionStringAdd(epConnectionStringInfo.ConnectionString);
        }
        
        public void Update(EpConnectionStringInfo epConnectionStringInfo) {
            DataProvider.Instance().EpConnectionStringUpdate(epConnectionStringInfo.ConnectionStringId, epConnectionStringInfo.ConnectionString);
        }
        
        public void Delete(Int32 connectionStringId) {
            DataProvider.Instance().EpConnectionStringDelete(connectionStringId);
        }
        
        public EpConnectionStringInfo GetItem(Int32 connectionStringId) {
            EpConnectionStringInfo infoObject = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpConnectionStringGet(connectionStringId);
                infoObject = (EpConnectionStringInfo)DotNetNuke.CBO.FillObject(idr, typeof(EpConnectionStringInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoObject;
        }
        
        // Select query methods for database table epConnectionString
        
        public ArrayList GetAllConnections() {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpConnectionStringGetAllConnections();
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpConnectionStringInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
    }
    
    public class epContentManagerSettingsInfo {
        
        // Entity member variables for database table epContentManagerSettings
        
        private Int32 mContentManagerSettingsId;
        private Int32 mFormDefinitionId;
        private Int32 mWorkflowId;
        private Int32 mModuleID;
        
        // Calculated Expression member variables for database table epContentManagerSettings
        
        
        // Entity properties for database table epContentManagerSettings
        
        public Int32 ContentManagerSettingsId {
            get { return mContentManagerSettingsId; }
            set { mContentManagerSettingsId = value; }
        }
        
        
        public Int32 FormDefinitionId {
            get { return mFormDefinitionId; }
            set { mFormDefinitionId = value; }
        }
        
        
        public Int32 WorkflowId {
            get { return mWorkflowId; }
            set { mWorkflowId = value; }
        }
        
        
        public Int32 ModuleID {
            get { return mModuleID; }
            set { mModuleID = value; }
        }
        
        
    }
    
    public class epContentManagerSettingsController {
        
        public Int32 Add(EpContentManagerSettingsInfo epContentManagerSettingsInfo) {
            return (Int32) DataProvider.Instance().EpContentManagerSettingsAdd(epContentManagerSettingsInfo.FormDefinitionId, epContentManagerSettingsInfo.WorkflowId, epContentManagerSettingsInfo.ModuleID);
        }
        
        public void Update(EpContentManagerSettingsInfo epContentManagerSettingsInfo) {
            DataProvider.Instance().EpContentManagerSettingsUpdate(epContentManagerSettingsInfo.ContentManagerSettingsId, epContentManagerSettingsInfo.FormDefinitionId, epContentManagerSettingsInfo.WorkflowId, epContentManagerSettingsInfo.ModuleID);
        }
        
        public void Delete(Int32 contentManagerSettingsId) {
            DataProvider.Instance().EpContentManagerSettingsDelete(contentManagerSettingsId);
        }
        
        public EpContentManagerSettingsInfo GetItem(Int32 contentManagerSettingsId) {
            EpContentManagerSettingsInfo infoObject = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpContentManagerSettingsGet(contentManagerSettingsId);
                infoObject = (EpContentManagerSettingsInfo)DotNetNuke.CBO.FillObject(idr, typeof(EpContentManagerSettingsInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoObject;
        }
        
        // Relation methods for database table epContentManagerSettings
        
        public ArrayList GetByepFormDefinition(Int32 formDefinitionId) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpContentManagerSettingsByepFormDefinition(formDefinitionId);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpContentManagerSettingsInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        public ArrayList GetByepWorkflow(Int32 workflowId) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpContentManagerSettingsByepWorkflow(workflowId);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpContentManagerSettingsInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        public ArrayList GetByModules(Int32 moduleID) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpContentManagerSettingsByModules(moduleID);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpContentManagerSettingsInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
    }
    

    public class epContentSecurityInfo {
        
        // Entity member variables for database table epContentSecurity
        
        private Int32 mContentSecurityId;
        private Int32 mMetaDataId;
        private Int32 mContentAuthorizedViewer;
        
        // Calculated Expression member variables for database table epContentSecurity
        
        
        // Entity properties for database table epContentSecurity
        
        public Int32 ContentSecurityId {
            get { return mContentSecurityId; }
            set { mContentSecurityId = value; }
        }
        
        
        public Int32 MetaDataId {
            get { return mMetaDataId; }
            set { mMetaDataId = value; }
        }
        
        
        public Int32 ContentAuthorizedViewer {
            get { return mContentAuthorizedViewer; }
            set { mContentAuthorizedViewer = value; }
        }
        
        
    }
    
    public class epContentSecurityController {
        
        public Int32 Add(EpContentSecurityInfo epContentSecurityInfo) {
            return (Int32) DataProvider.Instance().EpContentSecurityAdd(epContentSecurityInfo.MetaDataId, epContentSecurityInfo.ContentAuthorizedViewer);
        }
        
        public void Update(EpContentSecurityInfo epContentSecurityInfo) {
            DataProvider.Instance().EpContentSecurityUpdate(epContentSecurityInfo.ContentSecurityId, epContentSecurityInfo.MetaDataId, epContentSecurityInfo.ContentAuthorizedViewer);
        }
        
        public void Delete(Int32 contentSecurityId) {
            DataProvider.Instance().EpContentSecurityDelete(contentSecurityId);
        }
        
        public EpContentSecurityInfo GetItem(Int32 contentSecurityId) {
            EpContentSecurityInfo infoObject = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpContentSecurityGet(contentSecurityId);
                infoObject = (EpContentSecurityInfo)DotNetNuke.CBO.FillObject(idr, typeof(EpContentSecurityInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoObject;
        }
        
        // Relation methods for database table epContentSecurity
        
        public ArrayList GetByepMetaData(Int32 metaDataId) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpContentSecurityByepMetaData(metaDataId);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpContentSecurityInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
    }
    
    public class epContentViewerSettingsInfo {
        
        // Entity member variables for database table epContentViewerSettings
        
        private Int32 mContentViewerSettingsId;
        private Int32 mModuleID;
        private Int32 mTemplateDefinitionId;
        
        // Calculated Expression member variables for database table epContentViewerSettings
        
        
        // Entity properties for database table epContentViewerSettings
        
        public Int32 ContentViewerSettingsId {
            get { return mContentViewerSettingsId; }
            set { mContentViewerSettingsId = value; }
        }
        
        
        public Int32 ModuleID {
            get { return mModuleID; }
            set { mModuleID = value; }
        }
        
        
        public Int32 TemplateDefinitionId {
            get { return mTemplateDefinitionId; }
            set { mTemplateDefinitionId = value; }
        }
        
        
    }
    
    public class epContentViewerSettingsController {
        
        public Int32 Add(EpContentViewerSettingsInfo epContentViewerSettingsInfo) {
            return (Int32) DataProvider.Instance().EpContentViewerSettingsAdd(epContentViewerSettingsInfo.ModuleID, epContentViewerSettingsInfo.TemplateDefinitionId);
        }
        
        public void Update(EpContentViewerSettingsInfo epContentViewerSettingsInfo) {
            DataProvider.Instance().EpContentViewerSettingsUpdate(epContentViewerSettingsInfo.ContentViewerSettingsId, epContentViewerSettingsInfo.ModuleID, epContentViewerSettingsInfo.TemplateDefinitionId);
        }
        
        public void Delete(Int32 contentViewerSettingsId) {
            DataProvider.Instance().EpContentViewerSettingsDelete(contentViewerSettingsId);
        }
        
        public EpContentViewerSettingsInfo GetItem(Int32 contentViewerSettingsId) {
            EpContentViewerSettingsInfo infoObject = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpContentViewerSettingsGet(contentViewerSettingsId);
                infoObject = (EpContentViewerSettingsInfo)DotNetNuke.CBO.FillObject(idr, typeof(EpContentViewerSettingsInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoObject;
        }
        
        // Relation methods for database table epContentViewerSettings
        
        public ArrayList GetByepTemplateDefinition(Int32 templateDefinitionId) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpContentViewerSettingsByepTemplateDefinition(templateDefinitionId);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpContentViewerSettingsInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        public ArrayList GetByModules(Int32 moduleID) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpContentViewerSettingsByModules(moduleID);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpContentViewerSettingsInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
    }
    
    public class epControlTypeInfo {
        
        // Entity member variables for database table epControlType
        
        private Int32 mControlTypeId;
        private string mTitle;
        private string mControlPath;
        
        // Calculated Expression member variables for database table epControlType
        
        
        // Entity properties for database table epControlType
        
        public Int32 ControlTypeId {
            get { return mControlTypeId; }
            set { mControlTypeId = value; }
        }
        
        
        public string Title {
            get { return mTitle; }
            set { mTitle = value; }
        }
        
        
        public string ControlPath {
            get { return mControlPath; }
            set { mControlPath = value; }
        }
        
        
    }
    
    public class epControlTypeController {
        
        public Int32 Add(EpControlTypeInfo epControlTypeInfo) {
            return (Int32) DataProvider.Instance().EpControlTypeAdd(epControlTypeInfo.Title, epControlTypeInfo.ControlPath);
        }
        
        public void Update(EpControlTypeInfo epControlTypeInfo) {
            DataProvider.Instance().EpControlTypeUpdate(epControlTypeInfo.ControlTypeId, epControlTypeInfo.Title, epControlTypeInfo.ControlPath);
        }
        
        public void Delete(Int32 controlTypeId) {
            DataProvider.Instance().EpControlTypeDelete(controlTypeId);
        }
        
        public EpControlTypeInfo GetItem(Int32 controlTypeId) {
            EpControlTypeInfo infoObject = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpControlTypeGet(controlTypeId);
                infoObject = (EpControlTypeInfo)DotNetNuke.CBO.FillObject(idr, typeof(EpControlTypeInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoObject;
        }
        
        // Select query methods for database table epControlType
        
        public ArrayList GetAllControlType() {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpControlTypeGetAllControlType();
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpControlTypeInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
    }
    
    public class epDataConnectionInfo {
        
        // Entity member variables for database table epDataConnection
        
        private Int32 mDataConnectionId;
        private string mTableName;
        private Int32 mConnectionStringId;
        private string mPrimaryKeyName;
        
        // Calculated Expression member variables for database table epDataConnection
        
        
        // Entity properties for database table epDataConnection
        
        public Int32 DataConnectionId {
            get { return mDataConnectionId; }
            set { mDataConnectionId = value; }
        }
        
        
        public string TableName {
            get { return mTableName; }
            set { mTableName = value; }
        }
        
        
        public Int32 ConnectionStringId {
            get { return mConnectionStringId; }
            set { mConnectionStringId = value; }
        }
        
        
        public string PrimaryKeyName {
            get { return mPrimaryKeyName; }
            set { mPrimaryKeyName = value; }
        }
        
        
    }
    
    public class epDataConnectionController {
        
        public void Add(EpDataConnectionInfo epDataConnectionInfo) {
            DataProvider.Instance().EpDataConnectionAdd(epDataConnectionInfo.DataConnectionId, epDataConnectionInfo.TableName, epDataConnectionInfo.ConnectionStringId, epDataConnectionInfo.PrimaryKeyName);
        }
        
        public void Update(EpDataConnectionInfo epDataConnectionInfo) {
            DataProvider.Instance().EpDataConnectionUpdate(epDataConnectionInfo.DataConnectionId, epDataConnectionInfo.TableName, epDataConnectionInfo.ConnectionStringId, epDataConnectionInfo.PrimaryKeyName);
        }
        
        public void Delete(Int32 dataConnectionId) {
            DataProvider.Instance().EpDataConnectionDelete(dataConnectionId);
        }
        
        public EpDataConnectionInfo GetItem(Int32 dataConnectionId) {
            EpDataConnectionInfo infoObject = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpDataConnectionGet(dataConnectionId);
                infoObject = (EpDataConnectionInfo)DotNetNuke.CBO.FillObject(idr, typeof(EpDataConnectionInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoObject;
        }
        
        // Select query methods for database table epDataConnection
        
        public ArrayList GetAllDataConnections(Int32 ConnectionStringId) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpDataConnectionGetAllDataConnections(ConnectionStringId);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpDataConnectionInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        // Relation methods for database table epDataConnection
        
        public ArrayList GetByepConnectionString(Int32 connectionStringId) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpDataConnectionByepConnectionString(connectionStringId);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpDataConnectionInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
    }
    
    public class epFieldDefinitionInfo {
        
        // Entity member variables for database table epFieldDefinition
        
        private Int32 mFieldDefinitionId;
        private string mTitle;
        private string mCssClass;
        private bool mSearch;
        private string mTooltip;
        private string mSourceField;
        private Int32 mFormDefinitionId;
        private Int32 mControlTypeId;
        
        // Calculated Expression member variables for database table epFieldDefinition
        
        
        // Entity properties for database table epFieldDefinition
        
        public Int32 FieldDefinitionId {
            get { return mFieldDefinitionId; }
            set { mFieldDefinitionId = value; }
        }
        
        
        public string Title {
            get { return mTitle; }
            set { mTitle = value; }
        }
        
        
        public string CssClass {
            get { return mCssClass; }
            set { mCssClass = value; }
        }
        
        
        public bool Search {
            get { return mSearch; }
            set { mSearch = value; }
        }
        
        
        public string Tooltip {
            get { return mTooltip; }
            set { mTooltip = value; }
        }
        
        
        public string SourceField {
            get { return mSourceField; }
            set { mSourceField = value; }
        }
        
        
        public Int32 FormDefinitionId {
            get { return mFormDefinitionId; }
            set { mFormDefinitionId = value; }
        }
        
        
        public Int32 ControlTypeId {
            get { return mControlTypeId; }
            set { mControlTypeId = value; }
        }
        
        
    }
    
    public class epFieldDefinitionController {
        
        public Int32 Add(EpFieldDefinitionInfo epFieldDefinitionInfo) {
            return (Int32) DataProvider.Instance().EpFieldDefinitionAdd(epFieldDefinitionInfo.Title, epFieldDefinitionInfo.CssClass, epFieldDefinitionInfo.Search, epFieldDefinitionInfo.Tooltip, epFieldDefinitionInfo.SourceField, epFieldDefinitionInfo.FormDefinitionId, epFieldDefinitionInfo.ControlTypeId);
        }
        
        public void Update(EpFieldDefinitionInfo epFieldDefinitionInfo) {
            DataProvider.Instance().EpFieldDefinitionUpdate(epFieldDefinitionInfo.FieldDefinitionId, epFieldDefinitionInfo.Title, epFieldDefinitionInfo.CssClass, epFieldDefinitionInfo.Search, epFieldDefinitionInfo.Tooltip, epFieldDefinitionInfo.SourceField, epFieldDefinitionInfo.FormDefinitionId, epFieldDefinitionInfo.ControlTypeId);
        }
        
        public void Delete(Int32 fieldDefinitionId) {
            DataProvider.Instance().EpFieldDefinitionDelete(fieldDefinitionId);
        }
        
        public EpFieldDefinitionInfo GetItem(Int32 fieldDefinitionId) {
            EpFieldDefinitionInfo infoObject = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpFieldDefinitionGet(fieldDefinitionId);
                infoObject = (EpFieldDefinitionInfo)DotNetNuke.CBO.FillObject(idr, typeof(EpFieldDefinitionInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoObject;
        }
        
        // Select query methods for database table epFieldDefinition
        
        public ArrayList GetJoinFieldDefinitionControlTypes() {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpFieldDefinitionGetJoinFieldDefinitionControlTypes();
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpFieldDefinitionInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        // Relation methods for database table epFieldDefinition
        
        public ArrayList GetByepControlType(Int32 controlTypeId) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpFieldDefinitionByepControlType(controlTypeId);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpFieldDefinitionInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        public ArrayList GetByepFormDefinition(Int32 formDefinitionId) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpFieldDefinitionByepFormDefinition(formDefinitionId);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpFieldDefinitionInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
    }
    
    public class epFormDataConnectionsInfo {
        
        // Entity member variables for database table epFormDataConnections
        
        private Int32 mFormDefinitionId;
        private Int32 mDataConnectionId;
        
        // Calculated Expression member variables for database table epFormDataConnections
        
        
        // Entity properties for database table epFormDataConnections
        
        public Int32 FormDefinitionId {
            get { return mFormDefinitionId; }
            set { mFormDefinitionId = value; }
        }
        
        
        public Int32 DataConnectionId {
            get { return mDataConnectionId; }
            set { mDataConnectionId = value; }
        }
        
        
    }
    
    public class epFormDataConnectionsController {
        
        public void Add(EpFormDataConnectionsInfo epFormDataConnectionsInfo) {
            DataProvider.Instance().EpFormDataConnectionsAdd(epFormDataConnectionsInfo.FormDefinitionId, epFormDataConnectionsInfo.DataConnectionId);
        }
        
        public void Update(EpFormDataConnectionsInfo epFormDataConnectionsInfo) {
            DataProvider.Instance().EpFormDataConnectionsUpdate(epFormDataConnectionsInfo.FormDefinitionId, epFormDataConnectionsInfo.DataConnectionId);
        }
        
        public void Delete(Int32 formDefinitionId, Int32 dataConnectionId) {
            DataProvider.Instance().EpFormDataConnectionsDelete(formDefinitionId, dataConnectionId);
        }
        
        public EpFormDataConnectionsInfo GetItem(Int32 formDefinitionId, Int32 dataConnectionId) {
            EpFormDataConnectionsInfo infoObject = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpFormDataConnectionsGet(formDefinitionId, dataConnectionId);
                infoObject = (EpFormDataConnectionsInfo)DotNetNuke.CBO.FillObject(idr, typeof(EpFormDataConnectionsInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoObject;
        }
        
        // Relation methods for database table epFormDataConnections
        
        public ArrayList GetByepDataConnection(Int32 dataConnectionId) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpFormDataConnectionsByepDataConnection(dataConnectionId);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpFormDataConnectionsInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        public ArrayList GetByepFormDefinition(Int32 formDefinitionId) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpFormDataConnectionsByepFormDefinition(formDefinitionId);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpFormDataConnectionsInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
    }
    
    public class epFormDefinitionInfo {
        
        // Entity member variables for database table epFormDefinition
        
        private Int32 mFormDefinitionId;
        private string mTitle;
        
        // Calculated Expression member variables for database table epFormDefinition
        
        
        // Entity properties for database table epFormDefinition
        
        public Int32 FormDefinitionId {
            get { return mFormDefinitionId; }
            set { mFormDefinitionId = value; }
        }
        
        
        public string Title {
            get { return mTitle; }
            set { mTitle = value; }
        }
        
        
    }
    
    public class epFormDefinitionController {
        
        public Int32 Add(EpFormDefinitionInfo epFormDefinitionInfo) {
            return (Int32) DataProvider.Instance().EpFormDefinitionAdd(epFormDefinitionInfo.Title);
        }
        
        public void Update(EpFormDefinitionInfo epFormDefinitionInfo) {
            DataProvider.Instance().EpFormDefinitionUpdate(epFormDefinitionInfo.FormDefinitionId, epFormDefinitionInfo.Title);
        }
        
        public void Delete(Int32 formDefinitionId) {
            DataProvider.Instance().EpFormDefinitionDelete(formDefinitionId);
        }
        
        public EpFormDefinitionInfo GetItem(Int32 formDefinitionId) {
            EpFormDefinitionInfo infoObject = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpFormDefinitionGet(formDefinitionId);
                infoObject = (EpFormDefinitionInfo)DotNetNuke.CBO.FillObject(idr, typeof(EpFormDefinitionInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoObject;
        }
        
        // Select query methods for database table epFormDefinition
        
        public ArrayList GetAllFormDefinition() {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpFormDefinitionGetAllFormDefinition();
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpFormDefinitionInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        public ArrayList GetJoinFormDefinitionDataConnections() {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpFormDefinitionGetJoinFormDefinitionDataConnections();
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpFormDefinitionInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        public ArrayList GetJoinFormDefinitionFieldDefinition() {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpFormDefinitionGetJoinFormDefinitionFieldDefinition();
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpFormDefinitionInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
    }
    
    public class epMetaDataInfo {
        
        // Entity member variables for database table epMetaData
        
        private Int32 mMetaDataId;
        private string mTitle;
        private Guid mPKValue;
        private string mStatus;
        private Int32 mTaxonomyId;
        private Int32 mFormDefinitionId;
        private DateTime mScheduleDate;
        private DateTime mPublishingDate;
        private Int32 mUserID;
        private Int32 mPortalID;
        
        // Calculated Expression member variables for database table epMetaData
        
        
        // Entity properties for database table epMetaData
        
        public Int32 MetaDataId {
            get { return mMetaDataId; }
            set { mMetaDataId = value; }
        }
        
        
        public string Title {
            get { return mTitle; }
            set { mTitle = value; }
        }
        
        
        public Guid PKValue {
            get { return mPKValue; }
            set { mPKValue = value; }
        }
        
        
        public string Status {
            get { return mStatus; }
            set { mStatus = value; }
        }
        
        
        public Int32 TaxonomyId {
            get { return mTaxonomyId; }
            set { mTaxonomyId = value; }
        }
        
        
        public Int32 FormDefinitionId {
            get { return mFormDefinitionId; }
            set { mFormDefinitionId = value; }
        }
        
        
        public DateTime ScheduleDate {
            get { return mScheduleDate; }
            set { mScheduleDate = value; }
        }
        
        
        public DateTime PublishingDate {
            get { return mPublishingDate; }
            set { mPublishingDate = value; }
        }
        
        
        public Int32 UserID {
            get { return mUserID; }
            set { mUserID = value; }
        }
        
        
        public Int32 PortalID {
            get { return mPortalID; }
            set { mPortalID = value; }
        }
        
        
    }
    
    public class epMetaDataController {
        
        public Int32 Add(EpMetaDataInfo epMetaDataInfo) {
            return (Int32) DataProvider.Instance().EpMetaDataAdd(epMetaDataInfo.Title, epMetaDataInfo.PKValue, epMetaDataInfo.Status, epMetaDataInfo.TaxonomyId, epMetaDataInfo.FormDefinitionId, epMetaDataInfo.ScheduleDate, epMetaDataInfo.PublishingDate, epMetaDataInfo.UserID, epMetaDataInfo.PortalID);
        }
        
        public void Update(EpMetaDataInfo epMetaDataInfo) {
            DataProvider.Instance().EpMetaDataUpdate(epMetaDataInfo.MetaDataId, epMetaDataInfo.Title, epMetaDataInfo.PKValue, epMetaDataInfo.Status, epMetaDataInfo.TaxonomyId, epMetaDataInfo.FormDefinitionId, epMetaDataInfo.ScheduleDate, epMetaDataInfo.PublishingDate, epMetaDataInfo.UserID, epMetaDataInfo.PortalID);
        }
        
        public void Delete(Int32 metaDataId) {
            DataProvider.Instance().EpMetaDataDelete(metaDataId);
        }
        
        public EpMetaDataInfo GetItem(Int32 metaDataId) {
            EpMetaDataInfo infoObject = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpMetaDataGet(metaDataId);
                infoObject = (EpMetaDataInfo)DotNetNuke.CBO.FillObject(idr, typeof(EpMetaDataInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoObject;
        }
        
        // Select query methods for database table epMetaData
        
        public ArrayList GetAllMetaData(Int32 PortalID) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpMetaDataGetAllMetaData(PortalID);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpMetaDataInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        public ArrayList GetJoinAuthorizedViewers(Int32 MetaDataId, Int32 PortalID) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpMetaDataGetJoinAuthorizedViewers(MetaDataId, PortalID);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpMetaDataInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        public ArrayList GetJoinMetaDataByTaxonomy(Int32 PortalID, Int32 TaxonomyId) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpMetaDataGetJoinMetaDataByTaxonomy(PortalID, TaxonomyId);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpMetaDataInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        public ArrayList GetMetaDataByUser(Int32 PortalID, Int32 UserID) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpMetaDataGetMetaDataByUser(PortalID, UserID);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpMetaDataInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        public ArrayList GetMoreRecentApprovedContent(Int32 PortalID) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpMetaDataGetMoreRecentApprovedContent(PortalID);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpMetaDataInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        public ArrayList GetNotApprovedMetaDataByUser(Int32 PortalID, DateTime PublishingDate, Int32 UserID) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpMetaDataGetNotApprovedMetaDataByUser(PortalID, PublishingDate, UserID);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpMetaDataInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        public ArrayList GetWorkingMetaDataByUser(Int32 PortalID, Int32 UserID) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpMetaDataGetWorkingMetaDataByUser(PortalID, UserID);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpMetaDataInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        // Relation methods for database table epMetaData
        
        public ArrayList GetByepFormDefinition(Int32 formDefinitionId) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpMetaDataByepFormDefinition(formDefinitionId);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpMetaDataInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        public ArrayList GetByepTaxonomy(Int32 taxonomyId) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpMetaDataByepTaxonomy(taxonomyId);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpMetaDataInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        public ArrayList GetByPortals(Int32 portalID) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpMetaDataByPortals(portalID);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpMetaDataInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        public ArrayList GetByUsers(Int32 userID) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpMetaDataByUsers(userID);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpMetaDataInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
    }
    
    public class epMetaDataTaskInfo {
        
        // Entity member variables for database table epMetaDataTask
        
        private Int32 mMetaDataTaskId;
        private Int32 mTaskOrder;
        private DateTime mStartDate;
        private string mStatus;
        private string mTitle;
        private Int32 mTaskOwnerId;
        private DateTime mFinishDate;
        
        // Calculated Expression member variables for database table epMetaDataTask
        
        
        // Entity properties for database table epMetaDataTask
        
        public Int32 MetaDataTaskId {
            get { return mMetaDataTaskId; }
            set { mMetaDataTaskId = value; }
        }
        
        
        public Int32 TaskOrder {
            get { return mTaskOrder; }
            set { mTaskOrder = value; }
        }
        
        
        public DateTime StartDate {
            get { return mStartDate; }
            set { mStartDate = value; }
        }
        
        
        public string Status {
            get { return mStatus; }
            set { mStatus = value; }
        }
        
        
        public string Title {
            get { return mTitle; }
            set { mTitle = value; }
        }
        
        
        public Int32 TaskOwnerId {
            get { return mTaskOwnerId; }
            set { mTaskOwnerId = value; }
        }
        
        
        public DateTime FinishDate {
            get { return mFinishDate; }
            set { mFinishDate = value; }
        }
        
        
    }
    
    public class epMetaDataTaskController {
        
        public Int32 Add(EpMetaDataTaskInfo epMetaDataTaskInfo) {
            return (Int32) DataProvider.Instance().EpMetaDataTaskAdd(epMetaDataTaskInfo.TaskOrder, epMetaDataTaskInfo.StartDate, epMetaDataTaskInfo.Status, epMetaDataTaskInfo.Title, epMetaDataTaskInfo.TaskOwnerId, epMetaDataTaskInfo.FinishDate);
        }
        
        public void Update(EpMetaDataTaskInfo epMetaDataTaskInfo) {
            DataProvider.Instance().EpMetaDataTaskUpdate(epMetaDataTaskInfo.MetaDataTaskId, epMetaDataTaskInfo.TaskOrder, epMetaDataTaskInfo.StartDate, epMetaDataTaskInfo.Status, epMetaDataTaskInfo.Title, epMetaDataTaskInfo.TaskOwnerId, epMetaDataTaskInfo.FinishDate);
        }
        
        public void Delete(Int32 metaDataTaskId) {
            DataProvider.Instance().EpMetaDataTaskDelete(metaDataTaskId);
        }
        
        public EpMetaDataTaskInfo GetItem(Int32 metaDataTaskId) {
            EpMetaDataTaskInfo infoObject = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpMetaDataTaskGet(metaDataTaskId);
                infoObject = (EpMetaDataTaskInfo)DotNetNuke.CBO.FillObject(idr, typeof(EpMetaDataTaskInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoObject;
        }
        
        // Select query methods for database table epMetaDataTask
        
        public ArrayList GetJoinMetaDataTasksByOwner(Int32 TaskOwnerId) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpMetaDataTaskGetJoinMetaDataTasksByOwner(TaskOwnerId);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpMetaDataTaskInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        // Relation methods for database table epMetaDataTask
        
        public ArrayList GetByepTaskOwner(Int32 taskOwnerId) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpMetaDataTaskByepTaskOwner(taskOwnerId);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpMetaDataTaskInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
    }
    
    public class epTaskOwnerInfo {
        
        // Entity member variables for database table epTaskOwner
        
        private Int32 mTaskOwnerId;
        private Int32 mOwnerId;
        private string mOwnerType;
        
        // Calculated Expression member variables for database table epTaskOwner
        
        
        // Entity properties for database table epTaskOwner
        
        public Int32 TaskOwnerId {
            get { return mTaskOwnerId; }
            set { mTaskOwnerId = value; }
        }
        
        
        public Int32 OwnerId {
            get { return mOwnerId; }
            set { mOwnerId = value; }
        }
        
        
        public string OwnerType {
            get { return mOwnerType; }
            set { mOwnerType = value; }
        }
        
        
    }
    
    public class epTaskOwnerController {
        
        public Int32 Add(EpTaskOwnerInfo epTaskOwnerInfo) {
            return (Int32) DataProvider.Instance().EpTaskOwnerAdd(epTaskOwnerInfo.OwnerId, epTaskOwnerInfo.OwnerType);
        }
        
        public void Update(EpTaskOwnerInfo epTaskOwnerInfo) {
            DataProvider.Instance().EpTaskOwnerUpdate(epTaskOwnerInfo.TaskOwnerId, epTaskOwnerInfo.OwnerId, epTaskOwnerInfo.OwnerType);
        }
        
        public void Delete(Int32 taskOwnerId) {
            DataProvider.Instance().EpTaskOwnerDelete(taskOwnerId);
        }
        
        public EpTaskOwnerInfo GetItem(Int32 taskOwnerId) {
            EpTaskOwnerInfo infoObject = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpTaskOwnerGet(taskOwnerId);
                infoObject = (EpTaskOwnerInfo)DotNetNuke.CBO.FillObject(idr, typeof(EpTaskOwnerInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoObject;
        }
        
        // Select query methods for database table epTaskOwner
        
        public ArrayList GetJoinTasksByOwner(Int32 OwnerId) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpTaskOwnerGetJoinTasksByOwner(OwnerId);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpTaskOwnerInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
    }
    
    public class epTasksInfo {
        
        // Entity member variables for database table epTasks
        
        private Int32 mTaskId;
        private string mTitle;
        private Int32 mTaskOwnerId;
        private Int32 mWorkflowId;
        private Int32 mTaskOrder;
        
        // Calculated Expression member variables for database table epTasks
        
        
        // Entity properties for database table epTasks
        
        public Int32 TaskId {
            get { return mTaskId; }
            set { mTaskId = value; }
        }
        
        
        public string Title {
            get { return mTitle; }
            set { mTitle = value; }
        }
        
        
        public Int32 TaskOwnerId {
            get { return mTaskOwnerId; }
            set { mTaskOwnerId = value; }
        }
        
        
        public Int32 WorkflowId {
            get { return mWorkflowId; }
            set { mWorkflowId = value; }
        }
        
        
        public Int32 TaskOrder {
            get { return mTaskOrder; }
            set { mTaskOrder = value; }
        }
        
        
    }
    
    public class epTasksController {
        
        public Int32 Add(EpTasksInfo epTasksInfo) {
            return (Int32) DataProvider.Instance().EpTasksAdd(epTasksInfo.Title, epTasksInfo.TaskOwnerId, epTasksInfo.WorkflowId, epTasksInfo.TaskOrder);
        }
        
        public void Update(EpTasksInfo epTasksInfo) {
            DataProvider.Instance().EpTasksUpdate(epTasksInfo.TaskId, epTasksInfo.Title, epTasksInfo.TaskOwnerId, epTasksInfo.WorkflowId, epTasksInfo.TaskOrder);
        }
        
        public void Delete(Int32 taskId) {
            DataProvider.Instance().EpTasksDelete(taskId);
        }
        
        public EpTasksInfo GetItem(Int32 taskId) {
            EpTasksInfo infoObject = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpTasksGet(taskId);
                infoObject = (EpTasksInfo)DotNetNuke.CBO.FillObject(idr, typeof(EpTasksInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoObject;
        }
        
        // Select query methods for database table epTasks
        
        public ArrayList GetTasksByWorkflow(Int32 WorkflowId) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpTasksGetTasksByWorkflow(WorkflowId);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpTasksInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        // Relation methods for database table epTasks
        
        public ArrayList GetByepTaskOwner() {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpTasksByepTaskOwner();
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpTasksInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        public ArrayList GetByepWorkflow(Int32 workflowId) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpTasksByepWorkflow(workflowId);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpTasksInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
    }
    
    public class epTaxonomyInfo {
        
        // Entity member variables for database table epTaxonomy
        
        private Int32 mTaxonomyId;
        private string mDescription;
        private Int32 mParentId;
        
        // Calculated Expression member variables for database table epTaxonomy
        
        
        // Entity properties for database table epTaxonomy
        
        public Int32 TaxonomyId {
            get { return mTaxonomyId; }
            set { mTaxonomyId = value; }
        }
        
        
        public string Description {
            get { return mDescription; }
            set { mDescription = value; }
        }
        
        
        public Int32 ParentId {
            get { return mParentId; }
            set { mParentId = value; }
        }
        
        
    }
    
    public class epTaxonomyController {
        
        public Int32 Add(EpTaxonomyInfo epTaxonomyInfo) {
            return (Int32) DataProvider.Instance().EpTaxonomyAdd(epTaxonomyInfo.Description, epTaxonomyInfo.ParentId);
        }
        
        public void Update(EpTaxonomyInfo epTaxonomyInfo) {
            DataProvider.Instance().EpTaxonomyUpdate(epTaxonomyInfo.TaxonomyId, epTaxonomyInfo.Description, epTaxonomyInfo.ParentId);
        }
        
        public void Delete(Int32 taxonomyId) {
            DataProvider.Instance().EpTaxonomyDelete(taxonomyId);
        }
        
        public EpTaxonomyInfo GetItem(Int32 taxonomyId) {
            EpTaxonomyInfo infoObject = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpTaxonomyGet(taxonomyId);
                infoObject = (EpTaxonomyInfo)DotNetNuke.CBO.FillObject(idr, typeof(EpTaxonomyInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoObject;
        }
        
        // Select query methods for database table epTaxonomy
        
        public ArrayList GetTaxonomyRoot() {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpTaxonomyGetTaxonomyRoot();
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpTaxonomyInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        public ArrayList GetTaxonomySubTree(Int32 ParentId) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpTaxonomyGetTaxonomySubTree(ParentId);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpTaxonomyInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        // Relation methods for database table epTaxonomy
        
        public ArrayList GetByepTaxonomy(Int32 taxonomyId) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpTaxonomyByepTaxonomy(taxonomyId);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpTaxonomyInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
    }
    
    public class epTemplateDefinitionInfo {
        
        // Entity member variables for database table epTemplateDefinition
        
        private Int32 mTemplateDefinitionId;
        private string mBody;
        private Int32 mFormDefinitionId;
        
        // Calculated Expression member variables for database table epTemplateDefinition
        
        
        // Entity properties for database table epTemplateDefinition
        
        public Int32 TemplateDefinitionId {
            get { return mTemplateDefinitionId; }
            set { mTemplateDefinitionId = value; }
        }
        
        
        public string Body {
            get { return mBody; }
            set { mBody = value; }
        }
        
        
        public Int32 FormDefinitionId {
            get { return mFormDefinitionId; }
            set { mFormDefinitionId = value; }
        }
        
        
    }
    
    public class epTemplateDefinitionController {
        
        public Int32 Add(EpTemplateDefinitionInfo epTemplateDefinitionInfo) {
            return (Int32) DataProvider.Instance().EpTemplateDefinitionAdd(epTemplateDefinitionInfo.Body, epTemplateDefinitionInfo.FormDefinitionId);
        }
        
        public void Update(EpTemplateDefinitionInfo epTemplateDefinitionInfo) {
            DataProvider.Instance().EpTemplateDefinitionUpdate(epTemplateDefinitionInfo.TemplateDefinitionId, epTemplateDefinitionInfo.Body, epTemplateDefinitionInfo.FormDefinitionId);
        }
        
        public void Delete(Int32 templateDefinitionId) {
            DataProvider.Instance().EpTemplateDefinitionDelete(templateDefinitionId);
        }
        
        public EpTemplateDefinitionInfo GetItem(Int32 templateDefinitionId) {
            EpTemplateDefinitionInfo infoObject = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpTemplateDefinitionGet(templateDefinitionId);
                infoObject = (EpTemplateDefinitionInfo)DotNetNuke.CBO.FillObject(idr, typeof(EpTemplateDefinitionInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoObject;
        }
        
        // Select query methods for database table epTemplateDefinition
        
        public ArrayList GetJoinTemplateDefinitionFormDefinition(Int32 FormDefinitionId) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpTemplateDefinitionGetJoinTemplateDefinitionFormDefinition(FormDefinitionId);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpTemplateDefinitionInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
        // Relation methods for database table epTemplateDefinition
        
        public ArrayList GetByepFormDefinition(Int32 formDefinitionId) {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpTemplateDefinitionByepFormDefinition(formDefinitionId);
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpTemplateDefinitionInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
    }
    
    public class epWorkflowInfo {
        
        // Entity member variables for database table epWorkflow
        
        private Int32 mWorkflowId;
        private string mTitle;
        private string mDescription;
        
        // Calculated Expression member variables for database table epWorkflow
        
        
        // Entity properties for database table epWorkflow
        
        public Int32 WorkflowId {
            get { return mWorkflowId; }
            set { mWorkflowId = value; }
        }
        
        
        public string Title {
            get { return mTitle; }
            set { mTitle = value; }
        }
        
        
        public string Description {
            get { return mDescription; }
            set { mDescription = value; }
        }
        
        
    }
    
    public class epWorkflowController {
        
        public Int32 Add(EpWorkflowInfo epWorkflowInfo) {
            return (Int32) DataProvider.Instance().EpWorkflowAdd(epWorkflowInfo.Title, epWorkflowInfo.Description);
        }
        
        public void Update(EpWorkflowInfo epWorkflowInfo) {
            DataProvider.Instance().EpWorkflowUpdate(epWorkflowInfo.WorkflowId, epWorkflowInfo.Title, epWorkflowInfo.Description);
        }
        
        public void Delete(Int32 workflowId) {
            DataProvider.Instance().EpWorkflowDelete(workflowId);
        }
        
        public EpWorkflowInfo GetItem(Int32 workflowId) {
            EpWorkflowInfo infoObject = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpWorkflowGet(workflowId);
                infoObject = (EpWorkflowInfo)DotNetNuke.CBO.FillObject(idr, typeof(EpWorkflowInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoObject;
        }
        
        // Select query methods for database table epWorkflow
        
        public ArrayList GetAllWorkflows() {
            ArrayList infoList = null;
            IDataReader idr = null;
            try {
                idr = DataProvider.Instance().EpWorkflowGetAllWorkflows();
                infoList = DotNetNuke.CBO.FillCollection(idr, typeof(EpWorkflowInfo));
            } finally {
                if (idr!=null) {
                    idr.Close();
                    idr.Dispose();
                    idr = null;
                }
            }
            return infoList;
        }
        
    }
    
}
